package com.company.demo2;

// @

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class TestDemo {

    public static void main(String[] args) throws NoSuchFieldException, NoSuchMethodException {

        Class c = Student.class;

        MyAnnotaion m1 = (MyAnnotaion)c.getAnnotation(MyAnnotaion.class);
        System.out.println(m1.value());

        Field f = c.getDeclaredField("name");
        MyAnnotaion m2 = (MyAnnotaion)f.getAnnotation(MyAnnotaion.class);
        System.out.println(m2.value());

        Method m = c.getDeclaredMethod("study",new Class[]{});
        MyAnnotaion m3 = (MyAnnotaion)m.getAnnotation(MyAnnotaion.class);
        System.out.println(m3.value());

    }

}

// lombok
// @Data
// @NoArguments
// @AllArgute

// Servletjsp
// @WebServlet
// @Filter
// @Lister